package com.liang.cloud.Feign;

import com.liang.cloud.Dto.CartDTO;
import com.liang.cloud.Entity.ProductInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: 余亮亮
 * @description:
 * @create: 2020-03-26 11:59:40
 **/
@FeignClient(value = "cloud-provider-product" )
@Component
public interface ProductFeign {

    @GetMapping("/product/api/findOne/{id}")
    public ProductInfo findOne(@PathVariable("id") String productId);

    @PostMapping("/product/api/decreaseStore")
    public void decreaseStore(List<CartDTO> cartDTOList);


    @PostMapping("/product/api/addStore")
    public void addStore(List<CartDTO> cartDTOList);
}
